import request from "@/utils/request";

export function fetchList(query) {
  return request({
    url: "/user/list",
    method: "get",
    params: query,
  });
}

export function dealList(query) {
  return request({
    url: "/user/deal-list",
    method: "get",
    params: query,
  });
}

export function userDetail(id) {
  return request({
    url: "/user/detail",
    method: "get",
    params: { id },
  });
}

export function updateUser(data) {
  return request({
    url: "/user/update",
    method: "post",
    data,
  });
}

export function listAddress(query) {
  return request({
    url: "/address/list",
    method: "get",
    params: query,
  });
}

export function listCollect(query) {
  return request({
    url: "/collect/list",
    method: "get",
    params: query,
  });
}

export function listFeedback(query) {
  return request({
    url: "/feedback/list",
    method: "get",
    params: query,
  });
}

export function listFootprint(query) {
  return request({
    url: "/footprint/list",
    method: "get",
    params: query,
  });
}

export function listHistory(query) {
  return request({
    url: "/history/list",
    method: "get",
    params: query,
  });
}
export function upLoadUser(data) {
  return request({
    url: "/info/importData",
    method: "POST",
    data,
  });
}
